package net.shopxx.dao.impl;

import java.util.List;

import net.shopxx.dao.DeliveryOrderDao;
import net.shopxx.entity.DeliveryOrder;
import org.springframework.stereotype.Repository;

/**
 * Dao实现类 - 物流人员
 */

@Repository
public class DeliveryOrderDaoImpl extends BaseDaoImpl<DeliveryOrder, String> implements DeliveryOrderDao {

	// 关联处理
	@Override
	public void delete(DeliveryOrder deliveryCorp) {

		super.delete(deliveryCorp);
	}

	// 关联处理
	@Override
	public void delete(String id) {
		DeliveryOrder deliveryorder = load(id);
		this.delete(deliveryorder);
	}

	// 关联处理
	@Override
	public void delete(String[] ids) {
		for (String id : ids) {
			DeliveryOrder deliveryorder = load(id);
			this.delete(deliveryorder);
		}
	}
	

	public List getLoadByDistrib() {
		String hql = "select Count(delivery_id) as aa,distribStaff from DeliveryOrder group by distribStaff";
		return getSession().createQuery(hql).list();
	}

}